<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>地块信息列表</title>
</head>
<body>
    <div class="pd-20">
        <form id="itemEdit" name="itemEdit" method="post" action="../ashx/spui.ashx" class="form form-horizontal">
            <input type="hidden" class="actionValue" id="editAction" name="action" value="add" />
            <input type="hidden" id="id" name="id" />
            <input type="hidden" id="tablename" name="tablename" value="" />
            <input type="hidden" id="tablemidname" name="tablemidname" value="" />
            <input type="hidden" id="ftype" name="ftype" value="2" />
            <input type="hidden" id="fmaintype" name="fmaintype" value="2" />
            <input type="hidden" id="ftypename" name="ftypename" value="地块信息" />
            <!-- <input type="hidden" id="fdatabranchid" name="fdatabranchid" value="" />-->
            <input type="hidden" id="dataneedtouser" name="dataneedtouser" value="1" /><!--是否要包含通用数据必归属处理-->
            <input type="hidden" id="ywcheckonly" name="ywcheckonly" value="ftype,fmaintype,ffv1,fdatabranchid#当前编号已存在!" /><!--唯一性检查 所用字段要在表单中-->
            <div class="row cl">
                <label class="form-label col-1"><span class="c-red">*</span>编号：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv1" id="ffv1" nullmsg="字母或数字或-" datatype="/^[A-Za-z0-9-]+$/" placeholder="2~10个字母或数字或-" />
                    <input type="hidden" class="input-text" name="ffv2" id="ffv2" placeholder="名称" />
                </div>
                <div class="col-1"></div>

                <label class="form-label col-1"><span class="c-red">*</span>面积：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fnv1" id="fnv1" placeholder="面积" value="0" datatype="/^-?[1-9]+(\.\d+)?$|^-?0(\.\d+)?$|^-?[1-9]+[0-9]*(\.\d+)?$/" />
                </div>
                <div class="col-1"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">所属区域：</label>
                <div class="formControls col-2">
                    <span class="select-box">
                        <select class="select" size="1" name="ffv5" id="ffv5">
                        </select></span>
                    <input type="hidden" name="ffv4" id="ffv4" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1">地块类型：</label>
                <div class="formControls col-2">
                    <span class="select-box">
                        <select class="select" size="1" name="ffv8" id="ffv8">
                            <option value="露地">露地</option>
                            <option value="大棚">大棚</option>
                            <option value="其它">其它</option>
                        </select></span>
                </div>
                <div class="col-1"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1"><span class="c-red">*</span>片区主管：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv9" id="ffv9" datatype="*1-100" readonly="readonly" placeholder="右边选择或搜索选择" />
                    <input type="hidden" id="ffv10" name="ffv10" />
                </div>
                <div class="col-3 layui-form">
                    <select name="inoutusernamesel2" id='inoutusernamesel2' lay-filter="inoutusernamesel2" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
                <label class="form-label col-1"><span class="c-red">*</span>生产工人：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv6" id="ffv6" datatype="*1-100" readonly="readonly" placeholder="右边选择或搜索选择" />
                    <input type="hidden" id="ffv7" name="ffv7" />
                </div>
                <div class="col-3 layui-form">
                    <select name="inoutusernamesel" id='inoutusernamesel' lay-filter="testselect" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">打地：</label>
                <div class="col-3 layui-form">
                    <select name="ffv11" id='ffv11' lay-filter="ffv11" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
                <label class="form-label col-1">整地：</label>
                <div class="col-3 layui-form">
                    <select name="ffv12" id='ffv12' lay-filter="ffv12" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
                <label class="form-label col-1">底肥：</label>
                <div class="col-3 layui-form">
                    <select name="ffv13" id='ffv13' lay-filter="ffv13" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">水肥：</label>
                <div class="col-3 layui-form">
                    <select name="ffv14" id='ffv14' lay-filter="ffv14" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
                <label class="form-label col-1">植保：</label>
                <div class="col-3 layui-form">
                    <select name="ffv15" id='ffv15' lay-filter="ffv15" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
                <label class="form-label col-1">选苗：</label>
                <div class="col-3 layui-form">
                    <select name="ffv16" id='ffv16' lay-filter="ffv16" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">播种：</label>
                <div class="col-3 layui-form">
                    <select name="ffv17" id='ffv17' lay-filter="ffv17" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
                <label class="form-label col-1">育苗：</label>
                <div class="col-3 layui-form">
                    <select name="ffv18" id='ffv18' lay-filter="ffv18" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
                <label class="form-label col-1">采收：</label>
                <div class="col-3 layui-form">
                    <select name="ffv19" id='ffv19' lay-filter="ffv19" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">报废：</label>
                <div class="col-3 layui-form">
                    <select name="ffv20" id='ffv20' lay-filter="ffv20" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
                <label class="form-label col-1">结束：</label>
                <div class="col-3 layui-form">
                    <select name="ffv21" id='ffv21' lay-filter="ffv21" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">说明：</label>
                <div class="formControls col-3">
                    <input type="text" class="input-text" name="ffv3" id="ffv3" />
                </div>
                <div class="col-1"></div>

            </div>
            <div class="row cl">
                <div class="col-6 col-offset-4">
                    <button class="btn btn-primary radius" type="submit" id="btsub1">提交</button>&nbsp;&nbsp;
				<button class="btn btn-secondary radius" type="button" id="btn_reset">重置</button>&nbsp;&nbsp;
				<button onclick="layer_close();" class="btn btn-default radius" type="button">返回</button>
                </div>
            </div>
        </form>
    </div>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/layui/layui.js"></script>
    <script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
    <script type="text/javascript" src="../lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_au.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <!--以下为多选择下拉ggggggggggggg-->
    <link rel="stylesheet" href="../homepage/css/bootstrap.min.css" type="text/css" />
    <!-- <script type="text/javascript" src="../homepage/js/bootstrap.min.js"></script>

    <script type="text/javascript" src="../homepage/js/bootstrap-multiselect.js"></script>
    <link rel="stylesheet" href="../homepage/css/bootstrap-multiselect.css" type="text/css" />-->
    <script type="text/javascript">
        var uiform = null;

        HcUiAuloadInfoAuto = false;//将自动加载，设置为false（禁用自动加载）
        var loadisOk = 2;
        hcui_ajaxasync = false;//禁用异步，先加载下拉信息
        //加载处理
        function loadin() {
            layui.use(['form'], function () {
                uiform = layui.form();
                uiform.on('select(testselect)', function (data) {
                    $('#ffv7').val(data.value);
                    $('#ffv6').val($("#inoutusernamesel").find("option:selected").text());
                    //加载明细

                });
                uiform.on('select(inoutusernamesel2)', function (data) {
                    $('#ffv10').val(data.value);
                    $('#ffv9').val($("#inoutusernamesel2").find("option:selected").text());
                    //加载明细

                });
            });
            //本页面 
            spsetBase("yw_baseinfo", "id", "yw_baseinfo as T", "*", "#tablelist", "baseinfo2", "地块", "baseinfo2");
            //人员下拉加载 
            hcdoselbyPost("empid  as id,concat(depname,'-',empname) as name,empname as username,mobile as  tel,depname as address", "view_user", "branchid='" + HCUser.HCUorg + "'", "", "", "id",
                function (data) {
                    SetSelectWithArrayIdName("#inoutusernamesel", data);
                    SetSelectWithArrayIdName("#inoutusernamesel2", data);
                    SetSelectWithArrayIdName("#ffv11", data);
                    SetSelectWithArrayIdName("#ffv12", data);
                    SetSelectWithArrayIdName("#ffv13", data);
                    SetSelectWithArrayIdName("#ffv14", data);
                    SetSelectWithArrayIdName("#ffv15", data);
                    SetSelectWithArrayIdName("#ffv16", data);
                    SetSelectWithArrayIdName("#ffv17", data);
                    SetSelectWithArrayIdName("#ffv18", data);
                    SetSelectWithArrayIdName("#ffv19", data);
                    SetSelectWithArrayIdName("#ffv20", data);
                    SetSelectWithArrayIdName("#ffv21", data);

                    loadisOk--;
                    if (loadisOk <= 0 && auhcotype == "edit") {
                        hcui_ajaxasync = true;//恢复异步
                        loadInfoById(aumid, function (data) {
                            loadback(data);
                        });
                    }
                    // uiform.render('select');
                });
            //区域加载
            hcdoselbyPost("id,fv1 as name", "yw_baseinfo", "type='5' and  maintype='5' and databranchid='" + HCUser.HCUorg + "'", "", "", "id",
                   function (data) {
                       SetSelectWithArrayIdName("#ffv5", data);
                       loadisOk--;
                       if (loadisOk <= 0 && auhcotype == "edit") {
                           hcui_ajaxasync = true;//恢复异步
                           loadInfoById(aumid, function (data) {
                               loadback(data);
                           });
                       }

                   });
        }
        //重写  提交前数据处理
        function hcrBeforeSub() {
            $("#ffv4").val($('#ffv5 option:selected').text());
            $("#ffv2").val($('#ffv1').val());
        }
    </script>
</body>
</html>
